/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.grt192.mechansim.GRTBenchTest;

import com.grt192.actuator.GRTCANJaguar;
import com.grt192.core.Mechanism;
import com.grt192.sensor.GRTEncoder;
import com.grt192.sensor.canjaguar.GRTJagEncoder;

/**
 *
 * @author student
 */
public class EncodTestMechanism extends Mechanism {
    private GRTJagEncoder encod;
    private GRTCANJaguar jag;

    public EncodTestMechanism(GRTJagEncoder encod, GRTCANJaguar jag){
        this.encod = encod;
        this.jag = jag;
        init();
    }
    private void init(){
        addSensor("TestEncoder", encod);
        addActuator("TestJag", jag);

        encod.start();
        jag.start();

    }
    public double getDistance(){
        return encod.pidGet();
    }

    public GRTJagEncoder getEncod() {
        return encod;
    }

}
